package com.blackitheima3.LambdaDemo;

public class TestApple {
    public static void main(String[] args) {
        //匿名内部类
        goEatApple(new EatApple() {
            @Override
            public void eatA() {
                System.out.println("EAT eat 吃");
            }
        });
        //LAmbda 表达式
        goEatApple(()-> System.out.println("eat eat eatApple"));

    }
    public static void goEatApple(EatApple eatApple){
        eatApple.eatA();
    }
}
interface EatApple{
    public abstract void eatA();
}